package com.vcredit.bird.vo.ympush;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;

public class AndroidBody implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -128932841258847867L;

	private String ticker; // 必填 通知栏提示文字
	
	private String title; // 必填 通知标题
	
	private String text; // 必填 通知文字描述 
	
	private String icon; // 可选 状态栏图标ID, R.drawable.[smallIcon]
	
	private String largeIcon;  // 可选 通知栏拉开后左侧图标ID, R.drawable.[largeIcon]
	
	private String img; // 可选 通知栏大图标的URL链接。该字段的优先级大于largeIcon
	
	private String sound; // 可选 通知声音，R.raw.[sound]
	
	@JsonProperty("builder_id") 
	private Integer builderId;  // 可选 默认为0，用于标识该通知采用的样式

	@JsonProperty("play_vibrate") 
	private String playVibrate; // 可选 收到通知是否震动,默认为"true"
	
	@JsonProperty("play_lights")
	private String playLights; // 可选 收到通知是否闪灯,默认为"true"
	
	@JsonProperty("play_sound")
	private String playSound; // 可选 收到通知是否发出声音,默认为"true"
	
	@JsonProperty("afterOpen")
	private String afterOpen; // 必填 点击"通知"的后续行为，默认为打开app
	
	private String url; // 可选 当"after_open"为"go_url"时，必填
	
	private String activity; // 可选 当"after_open"为"go_activity"时，必填
	
	private String custom; // 可选  用户自定义内容
	
	public AndroidBody(Builder builder) {
		this.ticker = builder.ticker;
		this.title = builder.title;
		this.text = builder.text;
		this.icon = builder.icon;
		this.largeIcon = builder.largeIcon;
		this.img = builder.img;
		this.sound = builder.sound;
		this.builderId = builder.builderId;
		this.playVibrate = builder.playVibrate;
		this.playLights = builder.playLights;
		this.playSound = builder.playSound;
		this.afterOpen = builder.afterOpen;
		this.url = builder.url;
		this.activity = builder.activity;
		this.custom = builder.custom;
	}

	public String getTicker() {
		return ticker;
	}

	public void setTicker(String ticker) {
		this.ticker = ticker;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getLargeIcon() {
		return largeIcon;
	}

	public void setLargeIcon(String largeIcon) {
		this.largeIcon = largeIcon;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getSound() {
		return sound;
	}

	public void setSound(String sound) {
		this.sound = sound;
	}

	public Integer getBuilderId() {
		return builderId;
	}

	public void setBuilderId(Integer builderId) {
		this.builderId = builderId;
	}

	public String getPlayVibrate() {
		return playVibrate;
	}

	public void setPlayVibrate(String playVibrate) {
		this.playVibrate = playVibrate;
	}

	public String getPlayLights() {
		return playLights;
	}

	public void setPlayLights(String playLights) {
		this.playLights = playLights;
	}

	public String getPlaySound() {
		return playSound;
	}

	public void setPlaySound(String playSound) {
		this.playSound = playSound;
	}

	public String getAfterOpen() {
		return afterOpen;
	}

	public void setAfter_open(String afterOpen) {
		this.afterOpen = afterOpen;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getActivity() {
		return activity;
	}

	public void setActivity(String activity) {
		this.activity = activity;
	}

	public String getCustom() {
		return custom;
	}

	public void setCustom(String custom) {
		this.custom = custom;
	}
	
	
	public static class Builder {
		private String ticker;
		private String title;
		private String text;
		private String icon;
		private String largeIcon;
		private String img;
		private String sound;
		private Integer builderId;
		private String playVibrate; 
		private String playLights;
		private String playSound;
		private String afterOpen;
		private String url;
		private String activity;
		private String custom;
		
		public Builder(String ticker, String title, String text) {
			super();
			this.ticker = ticker;
			this.title = title;
			this.text = text;
		}
		
		public AndroidBody build() {
			return new AndroidBody(this);
		}
		
		public Builder icon(String icon) {
			this.icon = icon;
			return this;
		}
		
		public Builder largeIcon(String largeIcon) {
			this.largeIcon = largeIcon;
			return this;
		}
		
		public Builder img(String img) {
			this.img = img;
			return this;
		}
		
		public Builder sound(String sound) {
			this.sound = sound;
			return this;
		}
		
		public Builder builderId(Integer builderId) {
			this.builderId = builderId;
			return this;
		}
		
		public Builder playVibrate(String playVibrate) {
			this.playVibrate = playVibrate;
			return this;
		}
		
		public Builder playLights(String playLights) {
			this.playLights = playLights;
			return this;
		}
		
		public Builder playSound(String playSound) {
			this.playSound = playSound;
			return this;
		}
		
		public Builder afterOpen(String afterOpen) {
			this.afterOpen = afterOpen;
			return this;
		}
		
		public Builder url(String url) {
			this.url = url;
			return this;
		}
		
		public Builder activity(String activity) {
			this.activity = activity;
			return this;
		}
		
		public Builder custom(String custom) {
			this.custom = custom;
			return this;
		}
	}
}
